<template>
    <a-affix :offset-bottom="160">
        <div @click="scrollToTop()" class="scroll-top">
            <img src="@/assets/img/to_top_jiantou.png" alt="">
        </div>
    </a-affix>
</template>

<script setup>
import { scrollToTop } from '@/utils/scrollToTop.js';   //引入滚动到顶部的函数
</script>

<style scoped>
.scroll-top {
    float: right;
    width: 40rem;
    height: 40rem;
    cursor: pointer;
    background-color: #ffffff;
    padding: 5rem;
    border-radius: 50%;
}

.scroll-top>img {
    width: 30rem;
    height: 30rem;
}
</style>